public class ClassTest2 {
	public static void main(String [] args) {
		Point zero=new Point(0.0,0.0,0.0);
		Point a1=new Point(1.0,1.0,1.0);
		System.out.print("a1:");
		a1.display();
		
		System.out.println("x:"+a1.getX()+" y:"+a1.getY()+" z:"+a1.getZ());
		System.out.println(a1.distance(zero));
		
		a1.setX(2.0);
		a1.setZ(3.0);
		a1.display();
		System.out.println(a1.distance(zero));
	}
}

class Point {
	double x;
	double y;
	double z;
	
	Point(double _x,double _y,double _z){
		x=_x; y=_y; z=_z;
	}
	
	double getX() {
		return x;
	}
	
	double getY() {
		return y;
	}
	
	double getZ() {
		return z;
	}
	
	void setX(double nx) {
		x=nx;
	}
	
	void setY(double ny) {
		y=ny;
	}
	
	void setZ(double nz) {
		z=nz;
	}
	
	void display() {
		System.out.println("("+x+","+y+","+z+")");
	}
	
	double distance(Point a) {
		return Math.pow((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)+(a.z-z)*(a.z-z), 0.5);
	}
}